package ptij.verifier.test.sdftest;

import ptolemy.actor.*;
import ptolemy.kernel.*;
import ptolemy.kernel.util.*;
import ptolemy.data.*;
import ptolemy.data.type.*;

public class test1 extends TypedAtomicActor {

   public test1(CompositeEntity container, String Name) throws
           NameDuplicationException, IllegalActionException  {
       super(container, Name);      
   
       plus = new TypedIOPort(this, "plus", true, false);
       output = new TypedIOPort(this, "output", false, true);
   }

   public TypedIOPort plus;
   public TypedIOPort output;


   public void fire() throws IllegalActionException {

        if(plus.hasToken(0)) {
	    output.send(0, new Token());
	}
	else {
	   n = n + 1;
	   System.out.println(n);
	}
   
   
   }
   
   int n;
	
   
}
